home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / john / hc_quick.hqx / Quick Compacter™ 1.0.2 / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1989-11-15  |  4.0 KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.2</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2975</cardID>
  8.     <listID>2058</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>---------------------open stack,checks to clear report flds-------------
  17. on OpenStack
  18. global totsav,nmQC,cur,f1,tst,QLvar
  19. put empty into QLvar
  20. put CleanUp into temp
  21. if cd fld MultCheckΓëá1 then
  22. if cd fld "Title" is not empty and cd fld "Totsavings" is not empty then
  23. answer "Some information was left in the Report field" with┬¼
  24. "Clear It" or "Leave It"
  25. if it= "Clear It" then
  26. put empty into cd fld "Title"
  27. put empty into cd fld "BSaved"
  28. put empty into cd fld "PerSaved"
  29. put 0 into cd fld "Totsavings"
  30. put 0 into totsav
  31. end if
  32. if it = "Leave It" then
  33. put cd fld "Totsavings" into totsav
  34. end if
  35. end if
  36. end if
  37. put 0 into cur
  38. set the scroll of cd fld id 4 to cur
  39. set the scroll of cd fld id 25 to cur
  40. set the scroll of cd fld id 53 to cur
  41. put long name of this stack into nmQC
  42. end OpenStack
  43. -----------------Cleans up stack before quiting-------------------------
  44. on CloseStack
  45. global cur
  46. put CleanUp into temp
  47. put 0 into cur
  48. set the scroll of cd fld id 4 to cur
  49. set the scroll of cd fld id 25 to cur
  50. set the scroll of cd fld id 53 to cur
  51. set locktext of cd fld "Totsavings" to true
  52. set locktext of cd fld "Title" to true
  53. set locktext of cd fld "BSaved" to true
  54. put the freesize of this stack into fsQC
  55. if fsQC>0 then domenu "Compact Stack"
  56. end CloseStack
  57. -----------------------------------------------------------------------
  58. ----- This is the 'Guts' of the program...this does all the compaction
  59. -----------------------------------------------------------------------
  60. on DoIt
  61. global tst,totsav,nmQC,Numb,TotNumb,StackPath,Multcnt,ComStatus,┬¼
  62. Etst,QLtst,QLSTKName
  63. put empty into d
  64. put empty into u
  65. put empty into chr
  66. put empty into TargSTK
  67. ---only on Single or MultCom
  68. if ComStatus="S" or ComStatus="Mult"
  69. then
  70. put "Number"&&Numb&&"of"&&TotNumb into temp
  71. put "Attempt to compact which stack?"&&temp
  72. put empty into temp
  73. Put FileName("STAK") into TargSTK
  74. set cursor to watch
  75. if TargSTK is empty
  76. then
  77. put 1 into tst
  78. exit DoIt
  79. end if
  80. set lockscreen to true   -----these two lines will reset the screen
  81. set lockscreen to false  -----so that the outline disappears
  82. put short name of TargSTK into d
  83. put "Checking stack:"&&d
  84. put Che(TargSTK,ComStatus) into chr
  85. if chr="S,Y" then exit Doit
  86. if chr="M,Y,D"
  87. then
  88. put 1 into tst
  89. exit Doit
  90. end if
  91. if chr="M,Y,C" then exit Doit
  92. end if
  93. if ComStatus="ENTFLDR" then  ------------only for Entire FLDR com
  94. put the short name of StackPath into StackName
  95. put "Checking stack:"&&StackName
  96. put Che(StackPath,ComStatus) into chr
  97. if chr="E,Y,C" then exit Doit ---continue with loop
  98. if chr="E,Y,D" then ----exit Entire Folder compact loop
  99. put 1 into Etst
  100. exit Doit
  101. end if
  102. put StackPath into TargSTK
  103. end if
  104. if ComStatus="Q1" then ----------------only for single QL compact
  105. put "Checking stack:"&&QLSTKName
  106. put Che(StackPath,ComStatus) into chr
  107. if chr="Q1,Y" then exit Doit
  108. put StackPath into TargSTK
  109. end if
  110. if ComStatus="Q2" then --------------only for entire QL compact
  111. put "Checking stack:"&&QLSTKName
  112. put Che(StackPath,ComStatus) into chr
  113. if chr="Q2,Y,C" then exit Doit
  114. if chr="Q2,Y,D" then
  115. put 1 into QLtst
  116. exit Doit
  117. end if
  118. put StackPath into TargSTK
  119. end if
  120. ----End of Error Checking...all stacks should be compactable--------
  121. put the size of stack TargSTK into STS
  122. put freeSize of stack TargSTK into FTS
  123. if FTS=0 then
  124. if ComStatus="Mult" then
  125. answer "That stack does not need to be compacted." with┬¼
  126. "Cancel Run" or "Continue Run"
  127. if it="Cancel Run" then
  128. put 1 into tst
  129. end if
  130. else
  131. put the short name of TargSTK into temp
  132. put temp&&"does not need to be compacted."
  133. end if
  134. exit Doit
  135. end if
  136. put the number of chars of FTS into c
  137. put FTS into Cb
  138. if c>3 then
  139. put char c-3 of Cb into temp
  140. put